<?php
        namespace Admin\Model;
        use Think\Model;
        class QuestionModel extends Model{
       
            //自动验证
            protected $_validate = array(
                array('name','require','题目不能为空'),
                array('hot','/^[1,0]$/','热度选择错误',0,'regex',3),
                array('content','0,122','提问内容在122字以内',0,'length',3),
                );
        }